<template>
	<view class="item flex" @click="onClick(item.id)">
		<view class="title" style="font-weight: bold;">{{item.c_name}}  {{item.class_hour}}课时</view>
		<view class="flex vertical-center">
			<image src="../../../../static/icon/adderss.png" mode=""></image>
			<view class="text ellipsis">
				<text>{{item.s_name}}</text>
				<text>{{item.s_address}}</text>
			</view>
		</view>
		<view class="teacher-cont operation-item col-3">
			<image class="teacher-img" :src="item.t_img" mode=""></image>
			<view class="teacher-text">
				<text>名师</text>
				<text>{{item.t_name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: Object
		},
		data() {
			return {
				// id    【课程id】	 (int)
				// c_name 【课程名称】	 (string)
				// t_name 【老师名称】	 (string)
				// t_img 【老师照片】	 (string)
				// c_info	【课程详情】	 (string)
				// t_info	【老师简介】	 (string)

			}
		},
		methods: {
			onClick(id) {
				this.onGoNext(`/pages/course/all-course/all-course?id=${id}`)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item{
		padding: 0 25rpx;
		height: 161rpx;
		background-color: $color-white;
		border-radius: 5rpx;
		margin-bottom: 20rpx;
		box-shadow: 0 0 10rpx rgba(#888, .1);
		position: relative;
		flex-direction: column;
		justify-content: center;
		.title{
			padding-top: 20rpx;
			font-size: 28rpx;
			color: $text-color;
			line-height: 17rpx;
		}
		.flex{
			margin-top: 40rpx;
			image{
				width: 28rpx;
				height: 35rpx;
			}
			.text{
				width: 400rpx;
				margin-left: 20rpx;
				margin-bottom: 5rpx;
				text{
					margin-right: 20rpx;
					font-size: 22rpx;
					color: $text-color;
				}
			}
		}
		.teacher-cont{
			position: absolute;
			top: 0;
			bottom: 0;
			right: 25rpx;
			margin: auto;
			.teacher-img{
				width: 69rpx;
				height: 69rpx;
				margin-bottom: 19rpx;
				border-radius: 50%;
			}
			.teacher-text{
				font-size: 22rpx;
				line-height: 22rpx;
				color: $text-color;
				text{
					margin: 0 10rpx;
				}
			}
		}
	}
</style>
